home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / pmake / lst / RCS / lstClose.c,v < prev    next >
Encoding:
Text File  |  1992-05-19  |  1.7 KB  |  77 lines

  1. head     1.6;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.6
  10. date     88.11.17.20.51.55;  author adam;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.6
  21. log
  22. @checked in with -k by kupfer at 92.05.18.17.32.33.
  23. @
  24. text
  25. @/*-
  26.  * LstClose.c --
  27.  *    Close a list for sequential access.
  28.  *    The sequential functions access the list in a slightly different way.
  29.  *    CurPtr points to their idea of the current node in the list and they
  30.  *    access the list based on it. Because the list is circular, Lst_Next
  31.  *    and Lst_Prev will go around the list forever. Lst_IsAtEnd must be
  32.  *    used to determine when to stop.
  33.  *
  34.  * Copyright (c) 1988 by University of California Regents
  35.  *
  36.  * Permission to use, copy, modify, and distribute this
  37.  * software and its documentation for any purpose and without
  38.  * fee is hereby granted, provided that the above copyright
  39.  * notice appears in all copies.  Neither the University of California nor
  40.  * Adam de Boor makes any representations about the suitability of this
  41.  * software for any purpose.  It is provided "as is" without
  42.  * express or implied warranty.
  43.  */
  44. #ifndef lint
  45. static char *rcsid =
  46. "$Id: lstClose.c,v 1.6 88/11/17 20:51:55 adam Exp $ SPRITE (Berkeley)";
  47. #endif lint
  48.  
  49. #include    "lstInt.h"
  50.  
  51. /*-
  52.  *-----------------------------------------------------------------------
  53.  * Lst_Close --
  54.  *    Close a list which was opened for sequential access.
  55.  *
  56.  * Results:
  57.  *    None.
  58.  *
  59.  * Side Effects:
  60.  *    The list is closed.
  61.  *
  62.  *-----------------------------------------------------------------------
  63.  */
  64. void
  65. Lst_Close (l)
  66.     Lst        l;          /* The list to close */
  67. {
  68.     register List     list = (List) l;
  69.     
  70.     if (LstValid(l) == TRUE) {
  71.     list->isOpen = FALSE;
  72.     list->atEnd = Unknown;
  73.     }
  74. }
  75.  
  76. @
  77.